package com.hos.service;


import com.hos.dao.DoctorMapper;
import com.hos.pojo.Doctor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@Service
public class DoctorService {

    @Resource
    public DoctorMapper doctorMapper;

    public void modify(Doctor doctor) {
        doctorMapper.update(doctor);
    }

    public void add(Doctor doctor) {
        doctorMapper.insert(doctor);
    }

    public Integer checkIsbn(Doctor doctor) {
        return doctorMapper.countIsbn(doctor);
    }

    public void removes(Integer[] ids) {
        doctorMapper.deletes(ids);
    }

    public Doctor get(Integer id) {
        return doctorMapper.select(id);
    }

    public int count(Map<String, Object> param) {
        return doctorMapper.count(param);
    }

    public List<Doctor> getPageResult(Map<String, Object> param) {
        return doctorMapper.selectPageResult(param);
    }

    public Doctor getByIsbn(String bookIsbn) {
        return doctorMapper.selectByIsbn(bookIsbn);
    }

    public Doctor getById(Integer id) {
        return doctorMapper.selectById(id);
    }

}
